<?php
/**
 * CK 开发框架
 * User: Clake
 * Date: 15/6/7
 * Time: 04:28
 */

/**
 * 应用主配置文件
 */
return [
    //模块配置
    'module' => [],
    //控制器配置项
    'controller'=>[],
    //组件配置项
    'component'=>[],
    //路由配置项
    'router'=>[
        //默认模块
        'def_module' => 'Site',
        //默认控制器
        'def_controller'=>'Index',
        //默认动作
        'def_action'=>'Index',
        //允许执行模块
        'allowed_modules'=>['Site'],
        //URL地址分区配置模板
        'url_partition'=>'{module}/{controller}/{action}'
    ],
    'database'=>[
        'main' => [
            //要连接的数据库类型,DBA::DBA_MYSQL|DBA::DBA_SQLITE|DBA::DBA_MSSQL
            'type'=>\CK\Database\DBA::DBA_MYSQL,
            //表前缀
            'db_prefix'=>'',
            'master' => [
                'db_host'=>'localhost',
                'db_name'=>'',
                'db_user'=>'',
                'db_pass'=>'',
                //可选
                'db_port'=>3306
            ],
            'slave'=>[]
        ]
    ],
    'cookie'=>[
        //Cookie 前缀
        'prefix'=>'ck_',
        //Cookie 作用路径
        'path'=>'/',
        //Cookie 作用域
        'domain'=>'',
        //Cookie 过期时间
        'expire'=>null,
        //加密KEY
        'cipher'=>'www.clake.cc'
    ],
    'cache'=>[
        'type'=>'memcached',
        'conf'=>[
            'servers'=>[['host'=>'127.0.0.1','port'=>11211]]
        ]
    ]
];